-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
receive: use gRPC for forwarding messages #1970
Conversation
bdbc8d6
to
e1153af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super fast progress! I have some questions @blockloop
e1153af
to
f54ecf6
Compare
// ReadWriteStoreServer is a StoreServer and a WriteableStoreServer. | ||
type ReadWriteStoreServer interface { | ||
storepb.StoreServer | ||
storepb.WriteableStoreServer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering again about exposing these on the same gRPC service. If we do, we have to make sure to document that exposing the receive gRPC to a WAN to enable writes means that one tenant could read any other tenant’s metrics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's acceptable for now 🤔 we could change it in the future if needed.
It is today. We should change both (gRPC and http) to 1-indexed
El El jue, ene. 9, 2020 a las 15:18, Brett <[email protected]>
escribió:
… ***@***.**** commented on this pull request.
------------------------------
In pkg/store/storepb/rpc.proto
<#1970 (comment)>:
> @@ -39,6 +40,21 @@ service Store {
rpc LabelValues(LabelValuesRequest) returns (LabelValuesResponse);
}
+/// WriteableStore reprents API against instance that stores XOR encoded values with label set metadata (e.g Prometheus metrics).
+service WriteableStore {
+ // WriteRequest allows you to write metrics to this store via remote write
+ rpc RemoteWrite(WriteRequest) returns (WriteResponse) {}
+}
+
+message WriteResponse {
+}
+
+message WriteRequest {
+ string tenant = 1;
+ int64 replica = 2;
Is the replica header 0 indexed? I think 1 indexed would be the better
option given the zero value situation.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1970?email_source=notifications&email_token=AE4JAPZRMBIF4NGT7S65KA3Q44W2VA5CNFSM4KEP4QEKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCRGGB7I#discussion_r364761558>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4JAP7Q3DP6SJB74ZH2GLLQ44W2VANCNFSM4KEP4QEA>
.
|
4aa3200
to
ea911f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So awesome. We already hacked together a lot offline so most comments are already addressed. I have some v small requests and then 💯
6676444
to
0d039eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice :))) lgtm on green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a first glance LGTM. Could you rebase after the recent changes before the final review?
5748a8a
to
6709020
Compare
Rebase complete @GiedriusS |
Signed-off-by: Brett Jones <[email protected]>
6709020
to
018d262
Compare
Signed-off-by: Lucas Servén Marín <[email protected]>
d2706dc
to
9d1df07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small comment, otherwise this lgtm. Very incredibly fast turn around I have to say! Thank you so much! :)
CHANGELOG.md
Outdated
@@ -14,6 +14,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel | |||
- [#1969](https://github.com/thanos-io/thanos/pull/1969) Sidecar: allow setting http connection pool size via flags | |||
- [#1967](https://github.com/thanos-io/thanos/issues/1967) Receive: Allow local TSDB compaction | |||
- [#1975](https://github.com/thanos-io/thanos/pull/1975) Store Gateway: fixed panic caused by memcached servers selector when there's 1 memcached node | |||
- [#1970](https://github.com/thanos-io/thanos/issues/1970) Receive: Use gRPC for forwarding requests between peers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need an item here that indicates that people need to change their hashring files to be just addresses that the gRPC client is built from, instead of the full http endpoint.
Signed-off-by: Lucas Servén Marín <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So awesome! Thanks! lgtm 👍
This commit updates the controller to generate gRPC endpoints rather than HTTP endpoints, following thanos-io/thanos#1970. Signed-off-by: Lucas Servén Marín <[email protected]>
This commit updates the controller to generate gRPC endpoints rather than HTTP endpoints, following thanos-io/thanos#1970. Signed-off-by: Lucas Servén Marín <[email protected]>
Changes
Receive: use gRPC for forwarding messages between receive peers to significantly increase throughput. This also introduces the ability for users to use gRPC to write messages to Thanos via gRPC.
Verified
A working build can be run with this docker-compose configuration https://gist.github.com/blockloop/637bd0c8c9295178b67812f43e661419
The images used in that gist have been built from this branch. I have run it and verified that everything is working.
Here is a screenshot of Thanos query from that setup:
Fixes #1710